package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description:子类和父类的成员变量同名
 * User: 86183
 */


public class B extends A {
   /* public int a  = 100;//与父类名字、类型相同*/
    public  char b; //与父类名字相同、类型不相同

    public void fun(){
//        System.out.println(a);
        b = 200;
        b = 'c';
      /*  d = 130;//error*/
    }
}
